log error on fail, with more information