ensure accessing the persistent log only when the mutex is acquired