Fix bug with log file name modifying env.