store data to file