added Save button clicking to dialog handler