Writing to the output file is much faster.
both files run faster.