Improve migration error logging