Output the result to a file