Fix file open rules