<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save(self):
 """Update the configuration file on disk with the current contents of self.contents. Previous contents are overwritten. """


        try:
            with open(self.path, "w") as f:
                f.writelines(self.contents)
        except IOError as e:
            raise InternalError("Could not write RCFile contents", name=self.name, path=self.path, error_message=str(e))