Include error message in logging