Update writeCsv.m