module loading error handling fixed