Be more strict when reading bytes from an IO instance