Removed redundancies in determining the config file.