* update the rescue API.

* make apis more robust in exception handling.