Handle exceptions thrown in loadModules a bit better