logging + fixes