def file_path(path=None, payload=None, objectInput=None):
    """
    Given a file path, payload or file object, it writes file on disk and
    returns the temp path.

    Args:
        path (string): path of real file
        payload(string): payload in base64 of file
        objectInput (object): file object/standard input to analyze

    Returns:
        Path of file
    """
    f = path if path else write_payload(payload, objectInput)

    if not os.path.exists(f):
        msg = "File {!r} does not exist".format(f)
        log.exception(msg)
        raise TikaAppFilePathError(msg)

    return f