add max-retries to waitOpen and gracefully handle remove/delete events