Updated agent script to deploy the version file