print log on exception