write buffer size has to be bigger than 0