   } else {
     setNumber(0);
     isRunning = false;
-    Serial.write("Stopped countdown\n");
+    log("Stopped countdown\n");
   }
 }
 

  delay(loopDelay);

  if (lastNumber != number) {
    Serial.println(String("Set Number to ") + number);
  }
}


  setNumber(minutes);
}

void log(const String& message)
{
  String output;
  rtc.now().addToString(output);
  Serial.println(output + " " + message);
}

