Added failure support to fileupload