Added output file option for CLI
Added test for custom output file option