Create handler for save button

Create handler for save button