Fix make_ref type, remove dbg logging of lock file