add file flush func