logging exceptions and loops