added debugging mode and made option in GUI available