Remove use of the DEBUG_WRITE_LOCK to prefer the use of Logger class.

It will permit to get the messages in realtime if needed.