Better close path check