Log the return code in the debug message to properly indicate why the lock could not be obtained.
Changed paths: