statistics to file