Add logging to debug indexing error.