some tests and logging