buffer checking against bound buffers added

merged error checking functions into one as well, more uniform