why only check this if protocol is not file, platform or bundleentry ?