Add an --output flag and some stuff.