#20 Added Locking + unlocking Mechanism when saving file