Print result to file instead of stdout