Modified checkData to work with buffers >4 chars