setup abstraction, proper csv writer close