Added sanity checking to the uploader