remove unused function
properly count lines in write stream CLI