save to outputfile