Added some error messages to build.cpp