import pathlib


def is_file_ext_correct(parameter: str, filename: str, extension: str) -> bool:
    """Returns True if filename has correct file extension and prints message otherwise"
    
    Parameters
    ----------
    parameter: str
        The name of parameter used to print in error message
    filename: str
        The file name string
    extension: str
        File extension without dot (.) used to compare with filename
    
    Returns
    -------
    bool
        A flag used to determinate is the given filename has correct extension
    """
    try:
        assert pathlib.Path(filename).suffix == '.' + extension
    except:
        print(f'Wrong argument for --{parameter}. You must specify *.{extension} file for input')
        return False
    else:
        return True