First, rough, version. Capture stream and print it. You can pipe it to a file. To exit, Ctrl+c