Add support for saving errors to disk