read/write csv for commandline use
output in same format as input