Add some debug code for the queue.  Make startup more robust