finally putting initialization of logging to correct place