     }
     serialOut("card initialized.");
 
-
+#if TEST
+    //print out all files on the card
+    TGC_logfile = SD.open("/");
+    printDirectory(TGC_logfile, 0);
+#endif
 
     // create a new file
     newFile();
-    // connect to RTC
-    Wire.begin();  
-    if (!RTC.begin()) {
-        TGC_logfile.println("RTC failed");
-    serialOut("RTC failed");
-    }
-#endif
 
 }//setup
 

        error("couldnt create file");
    }

    Serial.print("Logging to: ");
    serialOut(filename);

    */
}//newFile

void standby(){

        "Battery Amps, Solar Amps,Hydro Amps,Load Amps,Battery Energy State,"
        "Outside Temp,Cabin Temp,Battery Temp\n", year, month, day, hour, minute, second, unix);

    sprintf(filename, "%08lu.csv", unix%100000000);

    TGC_logfile.close();

    if (! SD.exists(filename)) {
