Don't read and modify the same file at the same time