then, in summarize, i'm doing this:
function summarize (summary) {
var type = summary.toString();
summary.output.iterator().each(function(key, value) {
contents += (value + '\n');
return true;
});
}
then, creating a file object and saving the variable "contents" to it.