Added support for variable and field substitution in output paths