If the issue is opening word.lst, would it help to first use a small version of word.lst (containing say 5 words), and print them out as you read the file in? That way you can tell if you are reading in things to match in the first place... Just a thought.