Log write queue size.
Fix bug in push_front of the task queue.