Added timeout.cancel logic to search