     // https://stackoverflow.com/questions/8323159/how-to-convert-uint64-t-value-in-const-char-string
     // cardsize = uint64_t
     // length of 2**64 - 1, +1 for nul.
-    char buff[21];
-    // copy to buffer
-    sprintf( buff, "%" PRIu64, SD.cardSize() );
-    server.send( 200,  textPlainHeader, buff );
+    char content[21];
+    snprintf( content, sizeof( content ), "%" PRIu64, SD.cardSize() );
+    server.send( 200,  textPlainHeader, content );
   });
 
   server.on( "/api/files", []()

    }

    server.send( 200, textPlainHeader, defaultTimersLoaded() ? "Succes" : "Failed" );
    struct tm timeinfo;
    getLocalTime(&timeinfo);
    time_t secondsToday = ( timeinfo.tm_hour * 3600 ) + ( timeinfo.tm_min * 60 ) + timeinfo.tm_sec;
    for ( byte channelNumber = 0; channelNumber < NUMBER_OF_CHANNELS; channelNumber++ )
    {
      setPercentageFromProgram( channelNumber, secondsToday );
    }
  });

  server.on( "/api/pwmdepth", []() {

      }

      double tempPWMfrequency = server.arg( "newpwmfrequency" ).toFloat();
      if ( tempPWMfrequency < 100 || tempPWMfrequency > 20000 ) {
        server.send( 200, textPlainHeader, "Invalid PWM frequency" );
        return;
      }
      for ( uint8_t channelNumber = 0; channelNumber < NUMBER_OF_CHANNELS; channelNumber++ )
      {
        ledcActualFrequency = ledcSetup( channelNumber, tempPWMfrequency, ledcNumberOfBits );
      }
      //TODO: Save in preferences
    }
    char content[16];
    snprintf( content, sizeof( content ), "%i", ledcActualFrequency );
    server.send( 200, textPlainHeader, content );
  });

  server.on( "/api/minimumlevel", []()
