catch error if pkg is not in the list