change .data to .appdata in agent scripts