refactored to reduce paths duplication and support custom elasticsearch for logs

Add TODO about `gns->powny` in future.