checking to make sure the index path exists before reloading, avoiding a potential error