Combining all 3 of these into one file isn't a great idea, since it means we end up testing multiple things at the same time.  Ideally we test just `writeFile` or just `appendFile`, but not both at once, and especially not in the same tests.  Can you separate these out a bit more and make sure that each test is only testing a single thing?