fixed a few outputfile problems