Writing to ringbuffer until all data will be there