check permission method should be more robust with try/catch