add DNS check at begining
Merge pull request #26 from xinwu/master

add DNS check at begining