build stats csv