check size and checksum