def readFile(filename, split=False):
    """ Read the file and return it as a string
    Parameters
    ----------
        @param filename - path to the file
        @param split - whether to split at newline or not, default False
    Returns
    ----------
        @param s - either a string (if split==False) or a list of strings (if split==True)
            representing the entire file or its subsequent lines, respectively
    """
    with open(filename,'r') as f:
        # concentrate the file as a string
        s = ''
        for line in f:
            s += line
    f.close()
    if split:
        s = s.split("\n")
    return s