added some error resiliency for when location data are not available. this way the script should work on any machine, not just on osx with whereami installed.