Moved import methods into error handler