Experiment using check_call to reduce sources of error. Note that
the files are not unlinked if an error in R occurs. This will
need to be changed for production