log exception and stack