Takes input from console and prints it to a file. Then prints out the contents of the file.