core.c: Improve error reporting dealing with lock file

If the lock file can't be opened, log this error.

Similar to commit 7a7819705ef9e3ac5142e11d96d983eb3b29483d
for distrib.c

Signed-off-by: Hal Rosenstock <hal@mellanox.com>