   static const char * PASSWD_KEY_NVS           = "wwwpassword";  //the (changed) admin password is saved in NVS under this key
   static const char * HEADER_LASTMODIFIED      = "Last-Modified";
   static const char * HEADER_HTML              = "text/html";
+  static const char * INVALID_OPTION           = "Invalid option";
+  static const char * NO_SENSORNUMBER          = "No sensornumber";
+  static const char * INVALID_SENSORNUMBER     = "Invalid sensornumber";
 
   static AsyncWebServer server(80);
 
   while ( !systemStart.tv_sec )
     delay(100);
 
-  static char date[30];
-
-  strftime( date, sizeof( date ), "%a, %d %b %Y %X GMT", gmtime( &systemStart.tv_sec ) );
+  static char modifiedDate[30];
+
+  strftime( modifiedDate, sizeof( modifiedDate ), "%a, %d %b %Y %X GMT", gmtime( &systemStart.tv_sec ) );
 
   server.on( "/robots.txt", HTTP_GET, []( AsyncWebServerRequest * request ) {
     request->send( 200, HEADER_HTML, "User-agent: *\nDisallow: /\n" );

  });

  server.on( "/", HTTP_GET, [] ( AsyncWebServerRequest * request ) {
    if ( htmlUnmodified( request, date ) ) return request->send(304);
    AsyncWebServerResponse *response = request->beginResponse_P( 200, HEADER_HTML, index_htm, index_htm_len );
    response->addHeader( HEADER_LASTMODIFIED, date );
    request->send( response );
  });

  //  /channels or 'channels.htm'
  server.on( "/channels", HTTP_GET, [] ( AsyncWebServerRequest * request ) {
    if ( htmlUnmodified( request, date ) ) return request->send(304);
    AsyncWebServerResponse *response = request->beginResponse_P( 200, HEADER_HTML, channels_htm, channels_htm_len );
    response->addHeader( HEADER_LASTMODIFIED, date );
    request->send( response );
  });

  //  /editor or 'editor.htm'
  server.on( "/editor", HTTP_GET, [] ( AsyncWebServerRequest * request ) {
    if ( htmlUnmodified( request, date ) ) return request->send(304);
    AsyncWebServerResponse *response = request->beginResponse_P( 200, HEADER_HTML, editor_htm, editor_htm_len );
    response->addHeader( HEADER_LASTMODIFIED, date );
    request->send( response );
  });

  //  /logs or 'logs.htm'
  server.on( "/logs", HTTP_GET, [] ( AsyncWebServerRequest * request ) {
    if ( htmlUnmodified( request, date ) ) return request->send(304);
    AsyncWebServerResponse *response = request->beginResponse_P( 200, HEADER_HTML, logs_htm, logs_htm_len );
    response->addHeader( HEADER_LASTMODIFIED, date );
    request->send( response );
  });

  //  /setup or 'setup.htm'
  server.on( "/setup", HTTP_GET, [] ( AsyncWebServerRequest * request ) {
    if ( htmlUnmodified( request, date ) ) return request->send(304);
    AsyncWebServerResponse *response = request->beginResponse_P( 200, HEADER_HTML, setup_htm, setup_htm_len );
    response->addHeader( HEADER_LASTMODIFIED, date );
    request->send( response );
  });

  //  /filemanager or 'fileman.htm'
  server.on( "/filemanager", HTTP_GET, [] ( AsyncWebServerRequest * request ) {
    if ( htmlUnmodified( request, date ) ) return request->send(304);
    AsyncWebServerResponse *response = request->beginResponse_P( 200, HEADER_HTML, fileman_htm, fileman_htm_len );
    response->addHeader( HEADER_LASTMODIFIED, date );
    request->send( response );
  });


        logger.stopErrorLogging();
        return request->send( 200, HEADER_HTML, "OFF" );
      }
      else return request->send( 400, HEADER_HTML, INVALID_OPTION );
    }

    else if ( request->hasArg( "sensorname" ) ) {
      if ( request->arg( "sensorname" ).length() > sizeof( sensorName_t ) )
        return request->send( 400, HEADER_HTML, "Sensorname too long" );

      if ( !request->hasArg( "number" ) ) return request->send( 400, HEADER_HTML, NO_SENSORNUMBER );
      uint8_t num = request->arg( "number" ).toInt();
      if ( num > logger.sensorCount() ) return request->send( 400, HEADER_HTML, INVALID_SENSORNUMBER );
      sensorId_t id;
      logger.getSensorId( num, id );
      if ( !logger.setSensorName( id, request->arg( "sensorname" ).c_str() ) )
