added csv-line fn and flush after write