Update gate file