     Serial.println("File names: ");
     for (int i = 0; i < MAX_MAPS; i++)
     {
-      if (map_file_names[i] != NULL)
+      if (map_file_names[i] != "")
       {
         Serial.println(map_file_names[i]);
       }

#include <Common.h>
#include <IO.h>


{
  // open the file. note that only one file can be open at a time,
  // so you have to close this one before opening another.
  File myFile = SD.open(fileName, FILE_READ);
  
  // if the file opened okay, read from it:
  if (myFile) {
    
        Serial.print("Before select map file malloc freeMemory()=");
        Serial.println(freeMemory());

    // Initialize a string buffer to read lines from the file into
    // Allocate an extra char at the end to add null terminator
    char* buffer = (char*)malloc(myFile.size()+1);  

        Serial.print("After select map file malloc freeMemory()=");
        Serial.println(freeMemory());

    // index for the next character to read into buffer
    char* ptr = buffer;
