It now print statistics to file