Initialize logdir for log and error files