public function unlock()
    {
        $this->checkDirExists();

        $pidFile = $this->directory.$this->filename;
        if (!file_exists($pidFile)) {
            return false;
        }

        if (!is_writable($pidFile)) {
            throw new \Exception('Can not write to file: '.$pidFile);
        }

        return unlink($pidFile);
    }