Update to enable both elastic search and file implmentations and fix to shutdown all threads during each running interations