Added more debugging outputs.