use better line buffering