add some logs, and optimize webhook logic