fixing logger to attach before initialize