sack: write_*() should also check fclose().

suggested by mls.