detecting when contents have been removed from the json and then deleting the local copies