add error detection and avoid force quit
Merge pull request #197 from altsai/bug_bid_issue

add error detection and avoid force quit