Redirect output to a file.