don't abort on substInFile for dirs without elements