Added more error checking code to the method verify_config