fix bug when bind port faild;tune build script