save model when no errors