Added in file writing output & the output txt file