public function open()
    {
        if ($this->isOpened()) {
            return;
        }

        $this->handle = @fopen($this->filePath, self::OPEN_MODE);
        if ($this->handle === false) {
            throw new \RuntimeException("Could not open file for writing: " . $this->filePath);
        }

        if (!$this->lock(LOCK_EX)) {
            $this->close();
            throw new \RuntimeException("Could not aquire an exclusive lock for " . $this->filePath);
        }

        if ($this->options["backup"]) {
            $this->createBkFile();
        }
        
        $this->writeErrors = false;
    }