   Console.println("Temp/Humidity Logging using DHT sensors");
   Console.print("DHT LIBRARY VERSION: ");
   Console.println(DHT_LIB_VERSION);
-#ifdef DO_LOGGING
-  Console.println("Logging Enabled");
-  Console.print("Logging to");
-  Console.println(FILE_PATH);
-#else
-  Console.println("Logging Disabled");
-#endif
 
   // Update time  from server, and there-after every X 
   updateTimeFromServer(); // ~1.16s
   Console.print("Current time Set to: ");
   displayCurrentTime();
+
+#ifdef DO_LOGGING
+  Console.println("Logging Enabled");
+  Console.print("Logging to");
+  Console.println(FILE_DIRECTORY);
+
+  // Set filename to record to
+  getFilename();
+  Console.print("Filename set to: ");
+  Console.println(filePath);
+  lcd.print("Filename set to:");
+  lcd.setCursor(0, 1);
+  lcd.print(filename.substring(8)); // Assuming 8 chars is length of FILE_DIRECTORY
+  delay(2000);
+
+#else
+  Console.println("Logging Disabled");
+#endif
+
   Console.println("------");
 }
 


Process date; // process used to get the date
String dateTimeString; // string holding process returned date and time

// Used for main loop timing purposes
int last_second = -1;
int last_minute = -1;
int last_hour = -1;
int last_sensor_read_time = -1;

// Sensor results arrays


    updateLCD();
  }

  //// EVERY DAY (Update Filename here before writing etc.)
  if (day() != last_day)
  {
    last_day = day();
#ifdef DO_LOGGING
    getFilename();
    Console.print("Filename set to: ");
    Console.println(filePath);

    lcd.clear();
    lcd.print("Filename set to:");
    lcd.setCursor(0, 1);
    lcd.print(filename.substring(8)); // Assuming 8 chars is length of FILE_DIRECTORY
    delay(2000);
#endif
  }


  //// EVERY 10 SECONDS
  // Read sensors every 10 seconds
