added flag for enabling debug messages, without debug messages only connection events are displayed