I know this is a year old but I found a bunch of posts like this while looking for the useage of BTNear, so I figured I'd throw it out there for the next guy. It sounds like you didn't select the "Toggle" option. Without it, it will only turn on your Bluetooth the first time and it leaves it on to scan every X amount of seconds. It won't Toggle on, scan for BT device and then toggle off. Would explain why it runs fine at first and then after you turn off Bluetooth when you reach your destination. It either tries to scan with BT off and fails or it breaks the code when BT is mysteriously off and exits. Hope it helps someone.