Add routine to check bad check codes