Writes the performance to a text file