catch exceptions in upload process