Made the buffer flush each time a new line is found.