bugfix isset dirToOpen