Made error handle more logical, removed redundant code.
Fixed a bug that prevented individual uploads from having updated stats.\