update debug_print.h header, remove bugs and add comments