CsvWriter fixes by Toflar