Add read/write for messages