           month(epoch), day(epoch), year(epoch),
           hour(epoch), minute(epoch), second(epoch));
 }
-
-void open_file(void) {
-  char filename[] = "log_****-11-11_12:59:59.csv";
-
-  sprintf(filename, "log_%4d-%02d-%02d_%02d:%02d:%02d.csv",
-          year(), month(), day(), hour(), minute(), second());
-
-  logfile = SD.open(filename, FILE_WRITE);
-}

  delay(500);
  if( Udp.parsePacket() ) get_and_set_time();

  open_file();
}

void loop() {

    digitalWrite(yellowLed, HIGH);
    connect_to_server();
    digitalWrite(yellowLed, LOW);
  }

  if(canConnect) {
