added debug info when logging queue is not empty