Added in more cleanup for the separation of the file output.