add overwrite check