Working on msg_gen.sh