add debug messages to test-genmsg.sh