fixed up debug tracing, generalized bootloader