Adjusted the log levels
Introduced config macros
Bugfix