added more debugging outputs