Made logger optional in constructor