Slight change to ground detection
More debug output for ground detection