Added a line buffer to make output formatting nicer