added Debuglog config
refactored logging
added documentation