Added more debugging code