Extracted function print_import_error.