added CoreLocation error-handling code ref #1