fix logdir treatment