reduce space functionality going to write result back into new file using file reader