add log and logdir
check init