imporved debug output