shifted debug mode value to cfg hash, removed some scope issues with loading configs in subscripts