Added copy tmp file flag