write summary data to a file