Added an error handler to moduleImport