Adding retry handlers.
Merge pull request #9 from irieksts/retry

Adding retry handlers.