Added email notification and debug page