replaced cout and cerr by MessageLogger