Better contextual references for error log messages