Add general I/O buffer logic from the main repository