Complete file output module, with file-name-change support.