quit if no of docs is less than 10