Added line buffering