Added timeout option for searching.