move logging part to start_mmi