Add a first output file for convenience, and more code changes.