Log device errors along with their error code