bug fix and add some log info