added check to see if file exists prior to upload