Use queue in more trad way and improve debug output