Added more comprehensive debug output