Make CSV output a function in traverselite