added logging to index