Added exception handling to the importer