Write globalFile to cache