Add logging to init-python function