added code that uploads a new version of the file if the file is modified