file flush fix