Added email on error feature to all errors