public function load(bool $debug = false): void{
        $this->app = new Slim([
            'settings' => [
                'displayErrorDetails' => $debug
            ]
        ]);
        if (!$debug) {
            Error::registerSystemErrors($this->app);
        }
        $this->buildRoutes();
    }