doc and logging