Added exception handling

@isupeene Added exception handling with 1 retry. Realized while doing this that the retry may not help. If problem still exists after retries then the exception is bubbled up via the WrappedError class.
I don't understand - exceptions won't bubble up between threads.  If a thread throws an exception, it will just fail silently without us knowing.