Added check to see if file exits before trying to uplaod.