Added asyncwriter so the search is now threadsafe