bugfix for outfile