Implemented SAPI output buffering