Added modal dialog and confirmation messages when saving