Re-worked bot thread handling to a more fail-safe and automatically recovering method