Minor fixes to debugging scripts