error handling in importer
heavy speed increase!
some cleanup