Fix scoping for Logger initialization