HUE-1168 [shell] Race condition when merging token files