changed writeToDotFile