added check for failure to detect TE type and print line