Edits ecaldwell's PR for output to file