Switched to csv writer for file output.