Catch and log errors when importing data