Fix typo and missing format string in a fprintf in lock.h