improvement of RS_Debug class and --debug switch