Add ability to specify output filename and sensible default.