moved debug output to right place