protected function checkFile($writable = true)
    {
        if(!$this->fileExists()) throw NonExistentFileException::createForFileDoesNotExists($this->getFilePath());
        if(!is_readable($this->file_path)) throw NotReadableFileException::createForNotReadable($this->getFilePath());
        if($writable)
        {
            if(!is_writable($this->file_path)) throw NotWritableFileException::createForNotWritable($this->getFilePath());
        }
    }