improve check_digested_sequence_number.pl