Adding debug code to runtests