Improved save/read messages functions