[rbp] Some bug fixes, logging and tidying relating to buffering.