protected static function getExistingPath($path, $webDir, $fallbackPath = null)
    {
        return file_exists($webDir.'/'.$path)
            ? realpath($webDir.'/'.$path)
            : (null !== $fallbackPath ? $fallbackPath : $path);
    }