Use std::string for log file name in module Log

(cherry picked from commit 74414c31b10720458623048a92a19cd31c49e82b)
Take advantage of delete not acting on null values

The code 'delete 0' does nothing. So you can shorten code
like:

  if (x != 0) {
    delete x
  }

to simply: delete x

(cherry picked from commit f7ecf6f8fc7ebdfdb9b9b4ca1000161ccbf56379)