Added a lock function as a reverse operation for unlock
Handle broken symlinks
unlock keys and policystat