Added file output and cleaned up the output a little bit.