Move the LogPutString() call in log_error() into the locked