FPSCounter: Flush the logs every second and close them when the renderer is shut down.