Fixed #13, eventually crash when elasticsearch connection error