validate checksum when decoding