Update logging + some improvements