Port the WriteFile components