public function saveSecurityConfiguration($pathOverride = null, $debug = false) {
        if (!$this->ready) {
            //If the security file has not be loaded or started yet, return false
            return false;
        }
        //Set the path to attempt to write to
        $path = $pathOverride ?: $this->securityFile;

        //convert stuff and write out the file
        $dumper = new Dumper();
        $output = $dumper->dump($this->config, $this->determineMaxDepthOfConfig());

        try {
            file_put_contents($path, $output);
        } catch (\Exception $e) {
            if ($debug) {
                throw $e;
            } else {
                return false;
            }
        }

        return true;
    }