add WriteFile's test.
implement WriteFile method.