Optimzed the inventory import and added better error messages