protected static function fixPathForInput($file)
    {
        if (empty($file)) {
            throw new \InvalidArgumentException('fixPathForInput needs a valid $file, the given value was empty');
        }
        if (TYPO3_MODE === 'FE') {
            return GeneralUtility::getFileAbsFileName($file);
        }
        if (TYPO3_MODE === 'BE' && !self::isCliRequest()) {
            return GeneralUtility::resolveBackPath(PATH_typo3 . $file);
        }
        return $file;
    }