Centralize debug setting into config.h and add error message.

Setting is centralized for better reconfiguration of whole project. In time the configure will be used for setting up all parameters.