issue 2: removed setwd(dir_script)