Now handling missing and invalid modules