-added error handler for case when can't load modules