Return and output folded file in tui