added error handling for import failures