Added printing of headers in debug mode