     }
     if(final){
       if(Update.end(true)){
-        Serial.printf("Update Success: %uB\n", index+len);
+		if(debug) Serial.printf("Update Success: %uB\n", index+len);
       } else {
-        Update.printError(Serial);
+		if(debug) Update.printError(Serial);
       }
     }
   });
   
-
   server.begin();
   
-  Serial.println("started");
+  if(debug) Serial.println("started");
 }
 
 void sendBuffer(){

      script.close();
    }
  }
  
}


void loop() {
  if(shouldReboot) ESP.restart();
  
  if(Serial.available()) {
    uint8_t answer = Serial.read();
    if(answer == 0x99) {
      if(debug) Serial.println("done");
      runLine = true;
	}
	else {
		String command = (char)answer + Serial.readStringUntil('\n');
		command.replace("\r", "");
		if(command == "reset") {
			settings.reset();
			shouldReboot = true;
		}
	}
  }

  if(runScript && runLine){
    if(script.available()){
      uint8_t nextChar = script.read();
	  if(debug) Serial.write(nextChar);
      scriptLineBuffer[lc] = nextChar;
      lc++;
      if(nextChar == 0x0D || lc == bufferSize) addToBuffer();
