add logging utils which is a bit too coupled with particular implementation. This should be rewritten in the future