Added retry logic.

Fixes #40 
No because I still want the forever loop to keep going even if there is an error.