Many fixes.

* Fix logging for indexing.
* Indexing for files and dirs is equal.
* Fix resource type names.