def getFileContents(fileName, mode="r"):
    """
    Gets the contents of a file in string or binary form.
    
    Args:
        fileName (str):  The name of the file
        mode (str):  The file open method; defaults to string reader.
        
    Returns:
        (object):  Contents of the file in string or binary form based on mode selection
    """

    if mode is None:
        mode = "r"
        
    if mode == "r":
        with open(fileName, encoding='utf-8') as fp:
            content = fp.read()

    else:
        with open(fileName, mode) as fp:
            content = fp.read()
    
    return content