public function write($content)
    {
        $resource = $this->getResource();

        if ($this->use_locking) {
            flock($resource, LOCK_EX);
        }

        gzwrite($resource, $content);

        if ($this->use_locking) {
            flock($resource, LOCK_UN);
        }
    }