in reply to Flock

First, take a look at your local man flock docs: I'm assuming you are on a unix system. Here's some quick notes about file locking:

Finally, you say the file is being "constantly read from and appended to." Isn't it also going to be rewritten occasionally as people change their prefs and/or passwords? If you are definitely only appending, then you probably do not need a lock for those who are merely reading the file, as the addition of the appended information is not important on a small time scale.