Fix some bugs

1. open thread fails
2. check open pid status