Add a new parameter to choose file update method