use output file instead of stdout