Logging refactorin
Add reindex function !