add logging of inbound and outbound headers in debug mode