protected function _deleteOldUpload(Entity $entity, $field = false, $newFile = false, array $options = [])
    {
        if ($field === false || $newFile === false) {
            return true;
        }

        $fileInfo = pathinfo($entity->$field);
        $newFileInfo = pathinfo($newFile);

        if (isset($options['defaultFile']) && (is_bool($options['defaultFile']) || is_string($options['defaultFile']))) {
            $this->_defaultFile = $options['defaultFile'];
        }

        if ($fileInfo['basename'] == $newFileInfo['basename'] ||
            $fileInfo['basename'] == pathinfo($this->_defaultFile)['basename']) {
            return true;
        }

        if ($this->_prefix) {
            $entity->$field = str_replace($this->_prefix, "", $entity->$field);
        }

        $file = new File($this->_config['root'] . $entity->$field, false);

        if ($file->exists()) {
            $file->delete();
            return true;
        }

        return false;
    }