Writes results to newfile.txt