def mkdir_if_missing(path):
    if os.path.exists(path):
        if (not os.path.isdir(path)):
            fatal('Trying to create dir {}, but file with the same path already exists'.format(path))
        return
    os.makedirs(path)
def mkdir_if_missing(path):
    if os.path.exists(path):
        if (not os.path.isdir(path)):
            fatal('Trying to create dir {}, but file with the same path already exists'.format(path))
        return
    os.makedirs(path)