Adding the statistics information into a file