[PLAT-3784] Write explicit file instead of relying on copy