Added debugging-output (debugging can be turned on/off via options)