Fixes to warning and log printing