Add more logs and fix a git merge issue