changed location of elmtest.html to target and simplified printToFile