added exception handling in load_parameters