properly initialize IO buffer