Adding a debug function to auto-build.sh