Add maxRetries option (#20)