This assumes that the user has already run the program using "ant run" and chosen their output file to be named as "output.html". Rather than assuming this, you should look to the main method of SierspinskiTriangle (what gets run by "ant run") to see what it does to accomplish this programmatically and mimic that code here.