Added CSVWriter for debugging to a CSV file (not implemented yet).