Update and save the agent properties file