store only writes to file if changed