Change write buffer size to avoid buffer full problem