added error checking to the video upload process