logging error reason - per @cyli