changed date checking based on input from @Gandaki. Also added try:except to weed out problematic shapefiles.