add retry support when scanning