better error handling in migratore