Create file when reading file in mongoDB