write html rewrite to new file