public function save($id, $data)
    {
        $file = $this->getFilename($id);

        if (!$this->isWritable($file)) {
            throw new NotWritableException(sprintf('File could not be written to system as target is not writable: %s', $file));
        }

        if ($this->writeData($file, $data) === false) {

            $this->delete($file);

            throw new NotWritableException(sprintf('Data could not be written to file on system. Please make sure that file is writeable: %s', $file));
        }

        return $file;
    }