Add optional logger argument on constructor
Log error in case of exception in the implementation