Added code to allow output to a different file name