Use an atomic move to overwrite the file, avoiding any potential race conditions between triggers being run concurrently