added debug handler to complex logger. Created new tests