refactor gen_server2 debug handling
- more uniformity
- less code duplication
- less closure creation -> performance increase