Add retry functionality