Fix #222 Lock file feature

Todo:

* More test
* Documentation