Do not run the query twice when exporting to KML
KML content is already tested
Simplify steps for SHP and KML outputs