$LOGDIR might not be initialized