error checking for encoder