implemented --outfile param