Outputstream cleanup, fsync fix, enlarge buffers