Change add flush to output file handler