I feel we don't need a extra variable `msg` here so for printing debug log. please merge the two lines.