Better error handling in load_module.