Update test command to write to file.