fixed more output file issues