Fixed findOneAndUpdate() so that it saves the object after updating if no error is thrown