add progresscounting and catch exception while uploading