Improved ability to output to files