Fixed csv writing.  It works now\!