Added support for setting custom output file type.