split this big function into smaller function. I'd name this: "checkOrCopyConfigDir()"