insertUI module in module R Shiny

My goal is merging datasets from users, the users will upload 2 datasets and merge,if they want to merge another one, I stored the one just merge and insert another module, and keep going. I try to approach by inserting a module in another module. I don't know what I am doing wrong, it didn't give me the output the module I inserted. It need to be done in the modules.

I would be grateful for any help as I have been stuck on this for a while.

Code to reproduce the above:



uploadDtUI <- function(id){
  ns <- NS(id)
    shinyFilesButton(ns("file_2"), "Select The The Second Dataset", "Please Select The Second Dataset",FALSE),

uploadDt <- function(input, output, session) {
  ns <- session$ns
  roots = c(getVolumes()())
  shinyFileChoose(input,"file_2",session = session,root = roots)
  file_new <- reactive(input$file_2)
  output$filechosen_new <- renderPrint({
    as.character(parseFilePaths(roots, input$file_new)[4])



selectFilesInput <- function(id) {
  ns <- NS(id)
  tagList(shinyFilesButton(ns("file"), "Select The First Dataset", "Please Select The First Dataset",FALSE),
          actionButton(ns("add_ui"), "Add Another Dataset to Merge"),
          div(id = ns("placeholder"))

selectFiles <- function(input, output, session) {
  ns <- session$ns
  vol <- c(getVolumes()())
  shinyFileChoose(input,"file",session = session,root = vol)

  file <- reactive(input$file)
  output$filechosen <- renderPrint({
    as.character(parseFilePaths(vol, input$file)[4])
  ctn <- reactiveVal(0)
  observeEvent(input$add_ui, {
    ctn(ctn() + 1)
   new_id <- paste("module", ctn(), sep="_")
      selector = paste0('#', ns('placeholder')),
      where = "afterBegin",
      ui = uploadDtUI(ns(new_id))


ui <- fluidPage(

server <- function(input, output, session) {
  datafile <- callModule(selectFiles, "foo")

shinyApp(ui, server)