added error handling for can not find location