Returns null with exists even though there should be an asset at that location

Returns null even though the asset exists in the file. What should I do?
Here is the relevant code.


var path = getPath('images/$key.png', IMAGE, library);
        //trace(path);
        if (OpenFlAssets.exists(path, IMAGE)) {
            if(!currentTrackedAssets.exists(path)) {
                var newGraphic:FlxGraphic = FlxG.bitmap.add(path, false, path);
                newGraphic.persist = true;
                currentTrackedAssets.set(path, newGraphic);
            }
            localTrackedAssets.push(path);
            return currentTrackedAssets.get(path);
        }
        trace(path);
        trace(OpenFlAssets.exists(getPath('images/$key.xml', TEXT, library)));
        trace('oh no its returning null NOOOO');
        return null;
    }

I don’t know Flixel at all but your problem could be that the assets are not embedded ? In that case they do exist but you have to load them before you can access them