fix outfile flag bugs
outfilebugs as well