Improve the error message when failing to lock a package

I hope this message is more helpful. Better wording will be appreciated.