Flush console output after 800 lines to prevent browser memory overload