Cleaning up ringBuffer write