Added some error control to the upload size