Replaced console methods by exec method in Debug it's more graceful, if no console. Added some debug msgs.