Move StudyFileActivity update to top of script so that if it fails no other update will be run