Quick fix about LogWrite and fix Log's mutex

Using std::lock_guard is better :c
And. Fixing LogWrite for g++ (not sure)