update logging code