Added swap function to matrix. Added additional cmd option for output file. Changed cout output to print to file instead.