public function save($generatedConfig) {
        $filename = $this->_getVclFilename();
        $dir = dirname($filename);
        if ( ! is_dir($dir)) {
            // this umask is probably redundant, but just in case...
            if ( ! mkdir($dir, 0777 & ~umask(), true)) {
                $err = error_get_last();
                return array(false, $err);
            }
        }
        if (strlen($generatedConfig) !==
                file_put_contents($filename, $generatedConfig)) {
            $err = error_get_last();
            return array(false, $err);
        }
        return array(true, null);
    }