Removed need to use tmp html file