added save function (json format)
added existing file overwrite dialog