Add logging for IntegrityError in syncing