Write config file on user click of a Save button