def load_file(filename):
    """Load contents of an input file."""
    try:
        with open(filename) as fp:
            # no lstrip() because leading indentation is significant
            text = fp.read().rstrip()
    except FileNotFoundError as e:
        exit(f'Error: Input file "{filename}" does not exist.')

    if text == '':
        exit(f'Error: Input file "{filename}" is blank.')

    return text.split(sep='\n')