Minor. Simplify error callback.
Add logging about sending emails.
Fix bug with email.
Update packages.