an example of using the logger, and fixed the issue with it not exactly working