Add exception and test if logger is not callable