New function to output ERRORS in a uniform, consistent manner.
Minor improvements to build script. Renamed variable and improved error handling.
Even more error handling for build script.