Fix issue with writing to files.