new: generated flag file
opt: touch flag in the begin