remove merge mod before writing new one