Fix file releasing