moving error emails to production.py