Fixed CSV write snippet to yield csv instead of row