test saving data to file & sharedpreferences