bring in context to importer, improve error handling