* modified according to code review.
* extracted CheckStatus to ThriftUtil