Replace print by message