def save(self, path=None):
        """
        Saves the experience to a file.

        :param path: the file path to be saved
        :return: nothing
        """

        if not path:
            path = self.path

            # If the directory does not exist, create it
            if not os.path.exists(os.path.dirname(self.path)):
                os.makedirs(os.path.dirname(self.path), exist_ok=True)

        if not path:
            # Get path to root Plato directory
            path_to_here = os.path.dirname(os.path.abspath(__file__))
            path_to_root = '/'.join(path_to_here.split('/')[:-2])

            os.mkdir('logs/')

            path = \
                path_to_root + \
                f'/logs/Dialogues{datetime.datetime.now().isoformat()}.pkl'

            print('No Log file name provided. Using default: {0}'.format(path))

        obj = {'dialogues': self.dialogues}

        try:
            with open(path, 'wb') as file:
                pickle.dump(obj, file, pickle.HIGHEST_PROTOCOL)

        except IOError:
            raise IOError('Dialogue Episode Recorder I/O Error when '
                          'attempting to save!')

        Saves the experience to a file.

        :param path: the file path to be saved
        :return: nothing
        
plato/utilities/dialogue_episode_recorder.py