adds close() for index readers before setting to null