   ASSERT(file.write(msg, strlen(msg)) == (int) size);
   ASSERT(file.close());
   stop = RTC::millis();
+  ms = stop - start;
   trace << PSTR("Open/Write/Close file:");
-  trace << stop - start << PSTR(" ms") << endl;
+  trace << ms << PSTR(" ms") << endl;
+  trace.flush();
 
   // Reopen and read the message. Measure total time
   start = RTC::millis();
   ASSERT(file.open("NISSE.TXT", O_READ));
   ASSERT(file.is_open());
-  int c;
   while ((c = file.getchar()) != -1) trace << (char) c;
   ASSERT(file.close());
   stop = RTC::millis();
+  ms = stop - start;
   trace << PSTR("Open/Read/Close file:");
-  trace << stop - start << PSTR(" ms") << endl;
+  trace << ms << PSTR(" ms") << endl;
   trace << endl;
+  trace.flush();
 
   ASSERT(sd.end());
   ASSERT(true == false);

  static const size_t BUF_MAX = 512;
  static const uint8_t K_BYTE = 100;
  uint8_t buf[BUF_MAX];
  uint32_t start, stop;
  FAT16::File file;
  uint32_t size;
  int count;

  // List the files
  ASSERT(!file.is_open());
  FAT16::ls(trace, FAT16::LS_DATE | FAT16::LS_SIZE);
  trace << endl;

  // Measure time to open/create a file. List the files
  start = RTC::millis();
  ASSERT(file.open("TMP.TXT", O_WRITE | O_CREAT));
  stop = RTC::millis();
  trace << PSTR("Open file:") << stop - start << PSTR(" ms") << endl;
  FAT16::ls(trace, FAT16::LS_DATE | FAT16::LS_SIZE);
  trace << endl;

  // Measure time to write a large block (1 K)
  start = RTC::millis();

  // IOStream cout(&file);
  // cout.print((void*) NULL, 1024, IOStream::hex);
  stop = RTC::millis();
  ms = stop - start;
  trace << PSTR("Write file (") << K_BYTE << PSTR(" KByte,1024 Byte):")
	<< ms << PSTR(" ms (")
	<< K_BYTE * 1024.0 / ms << PSTR(" KBps)")
	<< endl
	<< endl;
  trace.flush();

  // Measure time to close a file
  start = RTC::millis();
  ASSERT(file.close());
  stop = RTC::millis();
  ms = stop - start;
  trace << PSTR("Close file:") << ms << PSTR(" ms") << endl;
  FAT16::ls(trace, FAT16::LS_DATE | FAT16::LS_SIZE);
  trace << endl;
  trace.flush();

  // Repen the time and measure the time to read character
  ASSERT(file.open("TMP.TXT", O_READ));
  start = RTC::millis();
  size = 0;
  while ((c = file.getchar()) != -1) size++;
  stop = RTC::millis();
  ms = stop - start;
  ASSERT(file.close());
  trace << PSTR("Read file (") << size / 1024
	<< PSTR("KByte,1 Byte):") << ms << PSTR(" ms (")
	<< size * 1.0 / ms << PSTR(" KBps)")
	<< endl;
  trace.flush();

  // Reopen the time and measure the time to read a smaller buffer
  ASSERT(file.open("TMP.TXT", O_READ));
  size = 0;
  start = RTC::millis();
  while ((count = file.read(buf, sizeof(buf))) > 0) size += count;
  stop = RTC::millis();
  ms = stop - start;
  ASSERT(file.close());
  trace << PSTR("Read file (") << size / 1024
	<< PSTR(" KByte,") << sizeof(buf) << PSTR(" Byte):")
	<< ms << PSTR(" ms (")
	<< size * 1.0 / ms << PSTR(" KBps)")
	<< endl
	<< endl;
  trace.flush();

  // Remove the file and list
  start = RTC::millis();
  ASSERT(FAT16::rm("TMP.TXT"));
  stop = RTC::millis();
  ms = stop - start;
  trace << PSTR("Remove file:") << ms << PSTR(" ms") << endl;
  FAT16::ls(trace, FAT16::LS_DATE | FAT16::LS_SIZE);
  trace << endl;
  trace.flush();

  // Open a new file and write a short message. Measure total time
  start = RTC::millis();
