Kill upload on failure

this feature branch improves error handling for backend connections. Specifically, it adds more logging, and breaks out of the loop whenever there is an error sending a result file.
This is inconsistent with what is used above, use this instead:

    except Exception as exp: