From the below code, make it so that it prints the max length of the tokens (length of the longest subword) and total vocab size, after having saved to a file:
```py
# BPE Vocabulary Generator in Google Colab
# This script reads 'dataset.txt', trains a BPE vocabulary, and writes the vocabulary to 'vocab.txt'.
# The vocabulary includes all ASCII characters and is sorted alphabetically.

import sys
from collections import defaultdict
import heapq

# Parameters
MAX_VOCAB_SIZE = 2000      # Maximum vocabulary size (including base 256 ASCII characters)
MAX_TOKEN_LENGTH = 10       # Maximum length of any token in the vocabulary

def initialize_vocab():
    """Initialize vocabulary with all 256 ASCII characters."""
    vocab = set()
    for i in range(256):
        vocab.add(chr(i))
    return vocab

def read_corpus(filename):
    """Read the dataset and tokenize it into words."""
    with open(filename, 'r', encoding='utf-8') as f:
        data = f.read()
    words = data.split()
    return words

def get_corpus(words):
    """
    Convert list of words into a frequency dictionary where each word is represented as a tuple of symbols.
    Each word ends with a space to denote word boundary instead of a special token.
    """
    corpus = defaultdict(int)
    for word in words:
        symbols = tuple(word) + (' ',)
        corpus[symbols] +=1
    return corpus

def get_pair_counts(corpus):
    """Count frequency of each adjacent symbol pair in the corpus."""
    pair_counts = defaultdict(int)
    for symbols, freq in corpus.items():
        for i in range(len(symbols)-1):
            pair = (symbols[i], symbols[i+1])
            pair_counts[pair] += freq
    return pair_counts

def merge_pairs(corpus, pair, new_symbol):
    """
    Merge all occurrences of the specified pair in the corpus with the new symbol.
    Returns a new corpus with the pairs merged.
    """
    new_corpus = {}
    pair_len = len(pair)
    for symbols, freq in corpus.items():
        new_symbols = []
        i = 0
        while i < len(symbols):
            # Check if the pair matches
            if i < len(symbols)-1 and symbols[i] == pair[0] and symbols[i+1] == pair[1]:
                new_symbols.append(new_symbol)
                i += 2  # Skip the next symbol as it's part of the pair
            else:
                new_symbols.append(symbols[i])
                i +=1
        new_symbols = tuple(new_symbols)
        new_corpus[new_symbols] = new_corpus.get(new_symbols, 0) + freq
    return new_corpus

def train_bpe(corpus, vocab, max_vocab_size, max_token_length):
    """Train BPE on the corpus until the vocabulary reaches max_vocab_size."""
    iteration = 0
    while len(vocab) < max_vocab_size:
        iteration +=1
        pair_counts = get_pair_counts(corpus)
        if not pair_counts:
            print("No more pairs to merge. Stopping training.")
            break
        # Find the most frequent pair
        most_frequent = max(pair_counts, key=pair_counts.get)
        freq = pair_counts[most_frequent]
        print(f'Iteration {iteration}: Most frequent pair {most_frequent} with frequency {freq}')
        # Check if adding the new symbol exceeds max_vocab_size
        if len(vocab) +1 > max_vocab_size:
            print('Maximum vocabulary size reached. Stopping training.')
            break
        # Create the new symbol by merging the pair
        new_symbol = ''.join(most_frequent)
        if len(new_symbol) > max_token_length:
            print(f'New symbol "{new_symbol}" exceeds maximum token length. Stopping training.')
            break
        # Add the new symbol to the vocabulary
        vocab.add(new_symbol)
        print(f'Adding new symbol: "{new_symbol}" to the vocabulary.')
        # Merge the pair in the corpus
        corpus = merge_pairs(corpus, most_frequent, new_symbol)
        print(f'Vocabulary size after iteration {iteration}: {len(vocab)}')
    return vocab

def save_vocab(vocab, filename):
    """Save the vocabulary to a file, sorted alphabetically, one token per line."""
    sorted_vocab = sorted(vocab)
    with open(filename, 'w', encoding='utf-8') as f:
        for token in sorted_vocab:
            f.write(token + '\n')
    print(f'Vocabulary successfully written to "{filename}".')

def main():
    # Initialize vocabulary with all ASCII characters
    vocab = initialize_vocab()
    print(f'Initialized vocabulary with {len(vocab)} ASCII characters.')

    # Read and process the corpus
    print('Reading and processing the dataset...')
    words = read_corpus('dataset.txt')
    print(f'Tokenized into {len(words)} words.')

    corpus = get_corpus(words)
    print(f'Corpus contains {len(corpus)} unique word forms.')

    # Train BPE
    print('Starting BPE training...')
    vocab = train_bpe(corpus, vocab, MAX_VOCAB_SIZE, MAX_TOKEN_LENGTH)
    print(f'Final vocabulary size: {len(vocab)}')

    # Save the vocabulary
    save_vocab(vocab, 'vocab.txt')

# Execute the main function
if __name__ == "__main__":
    main()
```