fix a small bug, 2. add more diagnosis log