handle logging exception