Added debug code for queue completion