Adopting some old code...
Adopted old debug printing methods