Refine warning log and code comment