Only flush the output every thousand lines. Every single line was a little too often.