small tweaks to debug script