protected function openHandle()
    {
        $fileName = $this->getFileName();

        $this->_handle = fopen($fileName, 'w');

        if (!$this->_handle) {
            throw new \Exception('Cannot open file ' . $fileName);
        }
    }