every 1000 lines, print the current line