Fixed bug with writing out files