impreve "save" function and setting file check