Added lock to build-new-packages script