refactored the KML-to-GeoJSON nested logic for executing callback with error/payload