Comey knew top aide was talking to media, emails show