Fixing up scripts for software tests and tidying some debug messages