deadlock from mutex acquisition in open_log() fixed