Function patchLockfile