Added code to check if a config file is loaded.