add buffer data in error log