trying to resolve issue of directory not being created without parent dir present