create buffer only if error