complete fileWrite