in reply to Help Me, I'm Blind!

Your immediate problem in your program is almost certainly that your data has rows with many fields, but you are checking for equality with a string with 2 fields. That is never going to work, perhaps you meant to call index instead?

However aside from the immediate problem, you have others. For instance your data format is very fragile, and your file-locking is definitely not working like you think it is. (When you close the file you lose the lock, then someone else can arrive and read the lock while you figure out what to write, then you write, then they write and your write was lost. Under load you will constantly lose votes.)

I suggest switching to locking a sentinel file to solve your locking problem, or else switching to a database to solve both your locking mistakes and your data format fragility.