Add debug module and statements to inspect protocol traffic.