adding util to overwrite file only if changed