switched csv back to text output, added newline and encoding params