       return;
     }
     Serial.println("card initialized.\n");
-    dataFile = SD.open(FILE_NAME, FILE_WRITE);
+    dataFile = SD.open(GPSfile, FILE_WRITE);
     // if the file is available, write date and time to it:
     if (dataFile) 
     {


    // open the file. note that only one file can be open at a time,
    // so you have to close this one before opening another.
    dataFile = SD.open(FILE_NAME, FILE_WRITE);
  
    // if the file is available, write to it:
    if (GPS_available && dataFile) 

/*---------------------------------------------------------------------------------------*/ 
void waypoint::SetTime(char *pTime, char * pDate)
{
//     was: GPSfile = "GPS_yymmdd_hhmmss.CSV"; 
//     now: GPSfile = "mmddhhmm.CSV";
//   strncpy(GPSfile+4,  pDate+4, 2);  // year   
     strncpy(GPSfile,  pDate+2, 2);  // month   
     strncpy(GPSfile+2,  pDate, 2);    // day    
     strncpy(GPSfile+4, pTime,2);     // GMT hour
     strncpy(GPSfile+6, pTime+2,2);     // minute
//   strncpy(GPSfile+11, pTime+4,2);     // second
     Serial.println(GPSfile);
}

