Added debug output capability to build.sh