protected function _renameAndMove(Model $model, File $file, array $options) {
        $nameCallback = null;

        if ($options['nameCallback'] && method_exists($model, $options['nameCallback'])) {
            $nameCallback = array($model, $options['nameCallback']);
        }

        if ($options['uploadDir']) {
            $file->move($options['uploadDir'], $options['overwrite']);
        }

        $file->rename($nameCallback, $options['append'], $options['prepend'], $options['overwrite']);

        return (string) $options['finalPath'] . $file->basename();
    }