Added the ability to print the parse tree to an output file