enhance path name handling