def try_open_handle_file(filename: str) -> str:
    """Try to open & read a file. Panic with a helpful error message if the file cannot be found or opened.

    :param filename: the filename of the file to open
    :returns: the body of the file, if successful
    """

    try:
        with(open(filename)) as f:
            return f.read()
    except FileNotFoundError:
        print(
            f'Fatal: The file `{filename}` does not exist and cannot be opened. Please check the filename!')

        exit(1)
    except IOError as error:
        print(
            f'Fatal: The file `{filename} cannot be opened! An exception was raised:\n\n', str(error))

        exit(1)