function save(string $file = null)
    {
        if ($file == null) {
            $file = static::$configFile;
        }

        $a = null;
        foreach ($this as $k => $v) {
            $a[$k] = $v;
        }
        return file_put_contents($file, json_encode($a, JSON_PRETTY_PRINT));
    }