Improve error messages during build.