write summary to file