Changed the output file path and moved it to a global variable