protected function openFile()
    {
        if (is_null($this->fp)) {
            $this->fp = @fopen($this->file, $this->mode);
            if (! $this->fp) {
                throw new Error('Unable to open ' . $this->file);
            }
        }

        return $this;
    }