protected function safeFileExists($sFilePath)
    {
        if (!is_string($sFilePath)) {
            throw new \InvalidArgumentException('Argument "$sFilePath" expects a string, "' . (is_object($sFilePath) ? get_class($sFilePath) : gettype($sFilePath)) . '" given');
        }

        // Retrieve "open_basedir" restriction
        if ($this->openBaseDirPaths === null) {
            if ($sOpenBaseDir = ini_get('open_basedir')) {
                $this->openBaseDirPaths = explode(PATH_SEPARATOR, $sOpenBaseDir);
            } else {
                $this->openBaseDirPaths = array();
            }
        }

        if (!$this->openBaseDirPaths) {
            return file_exists($sFilePath);
        }
        foreach ($this->openBaseDirPaths as $sAllowedPath) {
            if (strpos($sFilePath, $sAllowedPath)) {
                return file_exists($sFilePath);
            }
        }
        return false;
    }