moved toggle eventlistener to configureTree-Method and changed conditions of openFile case branch