'Send a message to a file.'

def send_message(self, message='', **kwargs):

    with open(self.filepath, 'a') as file:
        if (os.stat(self.filepath).st_size == 0):
            title = '{}    notifications    (Log    started:    {})\n{}\n'.format(kwargs.get(ATTR_TITLE, ATTR_TITLE_DEFAULT), dt_util.utcnow().isoformat(), ('-' * 80))
            file.write(title)
        if self.add_timestamp:
            text = '{}    {}\n'.format(dt_util.utcnow().isoformat(), message)
        else:
            text = '{}\n'.format(message)
        file.write(text)
