added error function for geolocation