Added check of connection to Elasticsearch.