logging actions and email notifications