def _read_file(path):
    """reads a file given by path, removes trailing white spaces,
    tabs and new lines and returns result"""
    with open(path) as attrib:
        data = attrib.read()
    return data.rstrip(' \t\n\r')