Do not write header if the apped flag present.

I think this isn't necessary, because I tested and it worked anyway. But
it doesn't seem right.