Added more debug code