Added a file lock. Added config