write summary table into a file