Fixes #3. Catches generic errors and sleeps.