Writing the dependency tree in a file for each class