Added variables for writing output to a file