Take a command-line argument...

... specifying the message stream(s) to request.

Also, check for NULL strings before printing them.