store fitting errors to file