Keep wfm file only open as long as we need it