from pathlib import Path


def check_file(path, file_name):
    """Check if a file exists in the given path"""
    path = Path(path)

    if path.exists():
        for f in path.iterdir():
            if file_name in f.name:
                return f

    return False