print to output file if there is one