more robust entitlement file handling