Add test for WriteFile