import logging and email exceptions to self