Add logdir to globals