Added code for reading and writing Communications from and to file