       if (nextionOtaResponse())
       {
         debugPrintln(String(F("LCD OTA: Success, wrote ")) + String(lcdOtaTransferred) + " of " + String(tftFileSize) + " bytes.");
-        // delay(5000); // extra delay while the LCD does its thing
+        delay(5000); // extra delay while the LCD does its thing
         espReset();
       }
       else

        debugPrintln(String(F("MQTT connection attempt ")) + String(mqttReconnectCount) + String(F(" failed with rc ")) + String(mqttClient.returnCode()) + String(F(".  Restarting device.")));
        espReset();
      }
      debugPrintln(String(F("MQTT connection attempt ")) + String(mqttReconnectCount) + String(F(" failed with rc ")) + String(mqttClient.returnCode()) + String(F(".  Trying again in 10 seconds.")));
      nextionSetAttr("p[0].b[1].txt", "\"WiFi Connected:\\r" + WiFi.localIP().toString() + "\\rMQTT Connect to" + String(mqttServer) + "\\rFAILED rc=" + String(mqttClient.returnCode()) + "\\rRetry in 10 sec\"");
      unsigned long mqttReconnectTimer = millis(); // record current time for our timeout
      while ((millis() - mqttReconnectTimer) < 10000)
      { // Handle HTTP and OTA while we're waiting 10sec for MQTT to reconnect
        yield();
        if (nextionHandleInput())
        { // Process user input from HMI
          nextionProcessInput();
        }
        webServer.handleClient();
        ArduinoOTA.handle();
      }
    }
  }

      espReset();
    }
  }
  else if (upload.status == UPLOAD_FILE_END)
  {
    if (lcdOtaTransferred >= tftFileSize)
    {
      if (nextionOtaResponse())
      {
        debugPrintln(String(F("LCD OTA: Success, wrote ")) + String(lcdOtaTransferred) + " of " + String(tftFileSize) + " bytes.");
        delay(5000); // extra delay while the LCD does its thing
        espReset();
      }
      else
      {
        debugPrintln(F("LCD OTA: Failure"));
        espReset();
      }
    }
  }
  else //if (upload.status == UPLOAD_FILE_WRITE)
  {
    static int lcdOtaChunkCounter = 0;
    static uint16_t lcdOtaPartNum = 0;
