exception handling for import