fixed exception logging