Support saving the result to a file