Updated how the text file is taken apart. Did some test printing for the output file.