tried to catch errors from buffer