Fix file appending.