Corrected model file and set up R script to run on Amazon server