Refactored update_config_files, added test