How to solve issue when change type from log to filestream in filebeat and duplication?

filestream ,the successor of log input, is now generally available in Filebeat and the version I use is 7.15. I have a single active log and I am using log as input type in filebeat.yml .and I found it is better to change input to filestream .when I change from log to filestream , I have duplications and I can't stop the source that is insert logs to the target file I addressed in filebeat, how can I deal with duplications and avoid it ? thanx