Added retry logic.

Fixes #40 
Can this just be `done()`?