for (const keyPath in transforms[ns]) {
      if (transforms[ns].hasOwnProperty(keyPath)) {
        const transform = transforms[ns][keyPath];
        const val = get(clone, keyPath);
        // we don't want to transform encrypted fields (that have not being decrypted yet)
        if (!val || typeof val === "string") continue; // eslint-disable-line no-continue
        set(clone, keyPath, transform.set(val));
      }
    }
Save given namespace to corresponding file, in atomic way