added support for saving residuals and predicted values