build.sh: identify origin of error messages