Add a section to check if required directory exists.