some refactorings

- introduce LockFile.Create method
- extract functionality for update a single package