public function insertSnippet(Plugin $plugin, $text, &$log = '')
    {
        $snippetProperties = $this->readProperties($text);
        $configContents    = file_get_contents($this->configFileLocation);

        if (stripos($configContents, "BEGIN PLUGIN CONFIG: {$plugin->Slug}") === false) {

            /* foreach($snippetProperties as $name => $value) {
                if($this->ApplicationContext->propertyExists($name))
                    $log .= "
                            /////////////////////////////
                            WARNING, plugin configuration property exists in context already: ['.$name.']
                            /////////////////////////////\n\n";
            } */
            $configContents .= "\n\n// BEGIN PLUGIN CONFIG: {$plugin->Slug}\n";
            $configContents .= $text."\n";
            $configContents .= "// END PLUGIN CONFIG: {$plugin->Slug}\n";

            if(!is_writable($this->configFileLocation))
            {
                $log .= "/////////////////////////////
WARNING, UNABLE TO WRITE TO YOUR CONFIG FILE.
PLEASE ADD THE FOLLOWING TO [".$this->configFileLocation."]:\n
".$configContents."\n
/////////////////////////////";

                return false;
            } else {

                FileSystemUtils::safeFilePutContents($this->configFileLocation, $configContents);
            }
        } else {
            foreach($snippetProperties as $name => $value)
                if (!$this->ApplicationContext->propertyExists($name))
                    $log .= "
/////////////////////////////
WARNING, YOU MUST ADD THE NEW CONFIG PROPERTY TO ".$this->configFileLocation.":
\$properties['$name'] = ".$value.";
/////////////////////////////\n\n";

            return false;
        }

        return true;
    }