Adding enhanced logging for context information