error handling of import