Update WriteFile in C#