Added support for applying metadata to input and output files.