check pkg before execution