improve detection if program is running; set logpath default value