Added error logic when you save.