remove default arg
try to break out actual csv writer function
fix function name shadowing bug