Couldn't you just include the averages and standard deviations in this file as well? That would likely be more convenient for users interacting with the output. In that case, this file would look like:

``
Category1 Category2 Category1Average Category1Std Category2Average Category2Std tval pvalue
Control Fast 4.4455362  0.534006934468 5.79022775  0.323085749714 -3.90625860184  0.012
``

Users interested in all of this data would only have to parse one file in this case. 

Also, these output files don't end with a newline. Can you modify so that they do?