correct outfile names
modified bin-ing program