fixed bug when strCompare2 reaches the end of the string
louder error messages