use Mutex in place of deprecated Lockfile