improve lock creation and dump format