Added code to release temporary shapefile before deletion