I suppose you are using open/create/replace vi, so you need two thing, set function to create or replace (create if you wire a new path, replace if it's still the same) and don't wire pattern (only valuable for dialog) but have the extension in the build `path vi.
Hope this helps