Added output option

Added option to write output to disk
Added tests for output options