 
     // Create the new filename including the system state
     if(LOAD_ON_FLAG == TRUE){
-    sprintf(filename, "%08lu.ON\0", unix%100000000);
+    sprintf(filename, "%08lu.ON", unix%100000000);
     }else{
-    sprintf(filename, "%08lu.OFF\0", unix%100000000);
+    sprintf(filename, "%08lu.OFF", unix%100000000);
     }
 
     // Make sure any open files are closed


void dumpFile(){
    debugOut("dumpFile");
    //Serial.flush();
    char mess[25];
    char i = 0;

    while(Serial.available()){
        mess[i] = Serial.read();
        i++;
        if(i>=23) break;
    }
    mess[i] = '\0'; // NULL terminate the string

    //debugOut(mess);
    //delay(SERIAL_DELAY);
    File dataFile = SD.open(mess);
    if(dataFile){
        while(dataFile.available()){

    int minute = now.minute();
    int second = now.second();

    char buff[500];
    char *header = buff;
    // Create the header using the current time/date data
    sprintf(header,
