Moved message logger to its own module