EXception handling and logging examples