add debug messages in test-genmsg.sh