logging expected exception