in reply to Increase efficiency of script

Why do you acquire an exclusive lock on a file you have open for reading? If multiple copies of the program act at the same time, they have to wait for each other to finish.

Abigail