detect error, ScratchBuffer()