bugfix check log-object for debug_mode