better error handling.
UploadPhoto also takes a filename argument to overwrite the actual filename