File write buffer added.  Doesn't seem to speed up much, so maybe remove again...