I have a console application that when runs i like to capture its console output and send to a file. any line as console gets updated should get appended to file. Any sample code or piece of working code?.