Now writes to a file.