add debug output to build.sh. refs #2