add ExceptionSaver and use it in a few places #299