add ExceptionSaver and use it in a few places #299

PR for merge to master