Fix bug for creating AF_LOG_DIR