Fixing a race in append file. Whoops.

We caused this when we changed synchronous calls to async calls.