protected function resolvePath(string $rootPath, string $configFilePath): string
    {
        $file = Path::makeAbsolute($configFilePath, $rootPath);

        if (!file_exists($file)) {
            throw new ConfigException("Config file doesn't exist.");
        }

        return $file;
    }