small fixes and log output