Added possibility to enable/disable debugging.