add new APIs to enable users define whether to overwrite the output directory