Working on generating rscript files