fix some bugs with command and add socket timeout