As I have stated above, here is what a bad thing can happen. The leader has stepdown to a follower and increase its term.
Then the follower still have chance to entry this func and try to append log to other peers using the newest term.

Which will lead to other peer with old term stepdown and think this follower server is the new leader.

What we need to do is to add a lock to make check status and get currentTerm atomic.