set up output file