fixed trace; added html write for compile