Improve argument checking in the BinaryIO.h, as there looks to be some corruption issue intermittently on tesseract jobs. Not clear where the root bug is.