Add initial timeout when waiting for documents