updated shapefile output to properly pick up directory name of output