Add `write` option to actually write out the hash into the files.