Got it working. Still need to do file output.