Adding summary to the output stream