Fix: only write when queue time actually passed, not just every time the queue has entries!