Added a test of log messages + a small fix