added logs and mail