Demonstrate how to write text file