add basename to CURDIR check