added outputing of the content in phase3.1
changed both phase 2 and phase3 to write streaming to logs
rather than store in memory