Removed recording of redundant data and cleaned the output file