Bug fix: now creates log file if it doesn’t exist.