code: def _check_file_corruption(self, header):
          
          # We need to handle 2 cases:
          # - corrupt file (we do our best to read the rest of the file)
          # - new ULog message type got added (we just want to skip the message)
          if header.msg_type == 0 or header.msg_size == 0 or header.msg_size > 10000:
              if not self._file_corrupt and self._debug:
                  print('File corruption detected')
              self._file_corrupt = True
  
          return self._file_corrupt
docs: check for file corruption based on an unknown message type in the header