add rank file exist; add email template