public function save($chmod = null)
    {
        if ($this->modified) {
            if (false === @file_put_contents($this->filename, $this->generateIni())) {
                throw new \Exception('Impossible to write into '.$this->filename);
            } elseif ($chmod) {
                chmod($this->filename, $chmod);
            }
            $this->modified = false;
        }
    }