Added debug output, a couple of printf statements. This is was used for githup training. Thanks Dimitri.