added logmode