check for package existence before installing