Use accumulator instead of temp files to test foreach