adding code to save the new error plots