write html output to a file