thread shutdown

threads get shut down if ctrl^d before done indexing