If you put two lists of names next to each other, what are the chances two names in the same row will match? That's what's happening here.
Appendpipe is the answer to a rare set of problems. This is not one of them.
Pick one lookup as the base and use the lookup command to see if the name exists in the other file. The command is case-insensitive so no need to shift case when comparing. If the name doesn't exist in the 2nd file then the lookup command will return NULL.