add fileUrl assignment to R code