Fixed file existence check