Took out debug prints. Now writes output to file.