def readBytes(fs, n):
    """Reads exactly n bytes and returns them."""
    r = fs.read(n)
    if len(r) != n:
        raise Exception('Can not read {} bytes only {} left'.format(n, len(r)))
    return r
