Final modification to csv write.