def get_file_ext(ext, fileName):
    """
    Helper function for making sure the correct file ending is appended.

    Parameters
    -------------
    ext = str, file extension. ex) ".json" or ".txt"

    fileName = str, path to file. Can include custom directory, uses processes/
                by default.

    Returns
    -------------
    typeName, fileName = str, file paths including the extension (typeName) and
                         without (fileName).
    """
    if ext != fileName[-len(ext):].lower():
        typeName = ''.join([fileName, ext])
    else:
        fileName = fileName[0:-len(ext)]
        typeName = ''.join([fileName, ext])

    return typeName, fileName