added some sanity checking to checksum length