Create a shared lock for reading
Create an exclusive lock for writing, and do the writing in a tmp file.
[Validate]