code: def save_to_filename(self, file_name, sep='\n'):
          
          fp = open(file_name, 'wb')
          n = self.save_to_file(fp, sep)
          fp.close()
          return n
docs: Read all messages from the queue and persist them to local file.
          Messages are written to the file and the 'sep' string is written
          in between messages.  Messages are deleted from the queue after
          being written to the file.
          Returns the number of messages saved.