Improve warning logs
Merge with Adam's changes