Disabled all log output.

Refactor logging into debug function with debug option.