added console.log() for tracing headers