add some debug logs and fix some typo in log msg