increased bufsize to 10 sec, added argv support