Adding email handler to logger.
Only emailing ERRORs and increasing width of message in email.
Refactoring.