updated line writer skips line every time it has new input.