added printout when outfile is written