Added a thread locking logger