added file and network persistence for messages