Fix cpu cores detection and auto-create log.txt