Defined  to fix kml extension problem

Defined $format to fix kml extension problem