add logpath, clean terminate