How to update the source json file if my document changes in mongodb

I have some json files in HDFS. I am storing them in Mongodb using spark and mongo connector.
If there is a change in my monogdb document then that needs to be updated in my HDFS file also.
Is there a way to do it using mongodb connector ?
If that is not supported what will be best way to handle this.