while training, log every 5000 lines processed