factory.py: updating logging initial logic