wait for rscripts and template files