I used the samples to create an app that makes a local replica from a hosted feature service. I notice that every time the app starts, it creates a new replica that can be seen in the feature service's REST directory page. After several iterations of editing the code and starting the app to test it, the feature service has a long list of replicas. Other 'official' apps like Collector do not do this so there must be a way to have the app check for an existing and valid replica before creating a new one. What is the correct way to do this?