Small fix to show log only if the branch is not None

Also show the object

Change-Id: I2268b6274451f254df391bcd42fb7324dcd2cd62