Improve migration logging and error messages.