update detection script