fixed email and logging