Added timeout for initial edge detection