make sure the pathname always exists