General improvements
Add support for specifying output file