More robust handling of config files.