Added code to check that a config file exists.