catch error when uploading incorrect attributes
edit/improve comments