protected function loadConfigFile($configName, array $configPaths): ConfigORM
    {
        // Cycle through all directories
        foreach ($configPaths as $directory) 
        {
            // If file exists, load it and break the loop
            $file = $directory . DS . 'config.'.$configName.'.php';
            if (file_exists($file))
            {
                // Load object
                return new ConfigORM($file);
                break;
            }
        }

        // Try fallback
        $file = Core::$coreDir . DS . 'Config' . DS . 'config.' . $configName . '.php';
        if (file_exists($file))
        {
            // Load object
            return new ConfigORM($file);
        }

        throw new ConfigException("Could not load config. File $configName not found", 1);
    }