Saving output to file - not working ATM