outputdir defaults to inputdir