1. fix minor bug; 2. enhance debug log