def log(message, final=True, total_length=70):
    """Simple print logger that facilitates repeated messages on one line"""
    end_buffer = max(20, total_length - len(message))
    print('\r{}'.format(message), end=end_buffer * ' ' + ('\n' if final else
        '\r'))
