misc: add 'debug' option to build script that routes stdout/stderr to txt files and does not build flashable zip