improved logging, unique id generation and indexing