checking if logdir exists adjusted