improve the path mismatch warning, update #2050, thanks @7stud and @zuozuo for testing this