Fix error logger if not Error type passed
New version