used chmod on the two .R files that run from the bach script