- self.files[topic] = open(self.path + topic, "r+")
- msg = self.files[topic].read()
+ self.files[topic] = open(self.path + topic, "a+")
+ # ignore previous content
+ for line in self.files[topic]:
+ if not line.endswith("\n"):
+ msg = line
+ msg += self.files[topic].readline()
+ if not msg.endswith("\n"):
+ return None