Json logging

Refactored tests and simplified usage of exported json file