Reset printedLines to [] at each cycle