add more log info and fix a match error