add --stream options, various fixes