R Shiny output not displaying when file is called from r script

I have a R shiny app which i am calling from a R script.But when i execute the script,R shiny output doesn't display,infact the processing of shiny code stops after a point.

getwd()
setwd("C:/Users/Mohapatra/Documents/R/Files")
fl <- list.files("C:/Users/Mohapatra/Documents/R/Files",
pattern = "*.csv",
full.names = TRUE)
fl
basename(fl)
fi<-basename(fl)
if(fi %in% 'Unisim'){
source("C:/Users/Mohapatra/Documents/R/Unisim_Shiny_App.R")
} else if(fi %in% 'Aspen_China'){
source("C:/Users/Mohapatra/Documents/R/Aspen_China_Shiny_App.R")
} else if(fi %in% 'Aspen_Munich'){
source("C:/Users/Mohapatra/Documents/R/Aspen_Munich_Shiny_App.R")
} else if(fi %in% 'OLI') {
source("C:/Users/Mohapatra/Documents/R/OLI_Shiny_App_App.R")
} else {
source("C:/Users/Mohapatra/Documents/R/Promax_Shiny_App.R")
}

So in the above code,based on the condition and the input file,the last script in the if else condition gets executed i.e "Promax_Shiny_App.R.

after which point does the processing stop ?

After the final data frame creation which is used for further processing of data and visualisation outputs,it stops there.

try

source("C:/Users/Mohapatra/Documents/R/Promax_Shiny_App.R")$value

Yes it worked.Thanks.Can i know the reason behind having $value besides the source file path,just for my reference and knowledge.

I don't know why it works.