Lock meta file before reading and writing