       OLED.drawString( 64, 20, formatStr );
       OLED.display();
     }
-
     ESP_LOGI( TAG, "%s", formatStr );
-
-    if ( FFat.format( true, (char*)"ffat" ) )
-      preferences.putString( "firstrun", "false" ); // and set token
-    else
-      ESP_LOGI( TAG, "Could not format FFat." );
-  }
-
-  if ( FFat.begin() )
-    ESP_LOGI( TAG, "FFat mounted." );
-  else
-    ESP_LOGI( TAG, "Could not mount FFat." );
+    FFat.format( true, (char*)"ffat" );
+    if (!FFat.begin()) {
+      ESP_LOGI( TAG, "FFat not mounted after formatting. Halting." );
+      while (true) delay(1000); /* system is halted */;
+    }
+  }
 
   if ( xOledTaskHandle ) {
     OLED.drawString( 64, 40, "Connecting..." );

      1);                             /* Core where the task should run */
  }

  /* format fatfs on first boot */
  if ( !preferences.getString("firstrun", "true" ).equals( "false" ) ) {
    const char * formatStr = "Formatting...";
    if ( xTftTaskHandle ) {
      tft.println( formatStr );

#include <ESPmDNS.h>               /* should be installed together with ESP32 Arduino install */
#include <Preferences.h>           /* should be installed together with ESP32 Arduino install */
#include <WiFi.h>                  /* should be installed together with ESP32 Arduino install */
#include <Adafruit_ILI9341.h>      /* Install 1.5.4 via 'Manage Libraries' in Arduino IDE */
#include <Adafruit_GFX.h>          /* Install 1.7.5 via 'Manage Libraries' in Arduino IDE */
#include <SSD1306.h>               /* Install 4.0.0 via 'Manage Libraries' in Arduino IDE -> https://github.com/ThingPulse/esp8266-oled-ssd1306 */
#include <XPT2046_Touchscreen.h>   /* Install 1.3 via 'Manage Libraries' in Arduino IDE */
#include <AsyncTCP.h>              /* Reports as 1.0.3 https://github.com/me-no-dev/AsyncTCP */
