trying with MessageLogger instead of cout