added validation for checking for invalid shapefiles